import request from '@/utils/request'

// 查询产品分类列表
export function listProduct(query) {
  return request({
    url: '/jxc/goodsCategory/getProductInfoList',
    method: 'get',
    params: query
  })
}

// 查询产品分类详细
export function getProduct(categoryId) {
  return request({
    url: '/jxc/goodsCategory/getInfoById/' + categoryId,
    method: 'get'
  })
}

// 新增产品分类
export function addProduct(data) {
  return request({
    url: '/jxc/goodsCategory/addProduct',
    method: 'post',
    data: data
  })
}

// 修改产品分类
export function updateProduct(productInfoEntity) {
  return request({
    url: '/jxc/goodsCategory/updateProduct',
    method: 'post',
    data: productInfoEntity
  })
}

// 删除产品分类
export function delProduct(ids) {
  return request({
    url: '/jxc/goodsCategory/delProduct/' + ids,
    method: 'post'
  })
}

// 导出产品分类
export function exportProduct(query) {
  return request({
    url: '/system/category/export',
    method: 'get',
    params: query
  })
}
